@extends('admin.layout')
@section('title',$title)
@section('content')
<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
               分类管理
                <small>分类管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="#">分类管理</a></li>
                <li class="active">分类管理</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">分类添加</h3>
                        </div><!-- /.box-header -->
                        <!-- form start --> 
                       

                        <form role="form" action="/admin/cate/insert"method="post" enctype="multipart/form-data">
                        {{ csrf_field() }}
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">分类名</label>
                                    <input type="text" value="{{old('username')}}" name = "name"  class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入分类名">
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputEmail1">分类关键字</label>
                                    <input type="text" value="" name = "keywords"  class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入分类关键字">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">产品分类描述</label>
                                    <input type="text" value="{{old('username')}}" name = "cdesc"  class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入产品分类描述">
                                </div>

                                 <label for="exampleInputEmail1">父分类</label>
                                 <select name = "pid" class="form-control">
                                 <option value="0">根分类</option>
                                 @foreach($data as $v)
                                    <option value="{{$v ->id}}">{{$v ->name}}</option>
                                 @endforeach
                                 </select>
                                
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提交</button>
                                <button type="reset" class="btn btn-danger">重置</button>
                            </div>
                            
                        </form>
                    </div><!-- /.box -->               
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!--/.col (right) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    @endsection